<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>网页布局3</title>
		<style>
		/*使用绝对定位和浮动效果一样*/
			.head,.foot,.main{
				width: 800px;
			}
			.head_l,.head_r{
				width: 380px;
				height: 180px;
				margin: 10px 10px;
				background-color: royalblue;
			}
			.main{
				height: 300px;
				background-color: orange;
				position: absolute;
				top: 200px;
				/*采用定位边距不生效*/
				left: 10px;
			}
			.head_l{
				float: left;
			}
			.head_r{
				float: right;
			}
		</style>
	</head>
	<body>
				<div class="head">
			<div class="head_l"></div>
			<div class="head_r"></div>
		</div>
		<div class="main"></div>
		<div class="foot"></div>		

	</body>
</html>
